<!--
@AURALINUX-DENY:STATE-CHANGE:DEFUNCT*
@WIN-DENY:EVENT_OBJECT_REORDER*
@WIN-DENY:EVENT_OBJECT_SHOW*
@WIN-DENY:EVENT_OBJECT_HIDE*
@WIN-DENY:IA2_EVENT_TEXT_INSERTED*
@WIN-DENY:IA2_EVENT_TEXT_REMOVED*
@UIA-WIN-DENY:*StructureChanged*
@UIA-WIN_DENY:AutomationFocusChanged*
-->
<!DOCTYPE html>
<div id="menu" aria-label="menu" role="menu" style="display: none">
  <div tabindex="2" id="menuitem1" aria-label="submenu1" role="menuitem"></div>
  <div tabindex="3" id="menuitem2" aria-label="submenu2" role="menuitem">
    <div id="submenu" role="menu" style="display:none">
      <div tabindex="4" id="menuitem2.1" aria-label="option" role="menuitem"></div>
    </div>
  </div>
</div>
<script>
  const go_passes = [
    () => document.getElementById('menu').style.display = 'block',
    () => document.getElementById('submenu').style.display = 'block',
    () => document.getElementById('submenu').style.display = 'none',
    () => document.getElementById('menu').style.display = 'none',
  ];

  var current_pass = 0;
  function go() {
    go_passes[current_pass++].call();
    return current_pass < go_passes.length;
  }
</script>
